<?php
$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-backend',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => ['log'],
    'modules' => [],
    'components' => [
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => true,
        ],
        // 'user' => [
        //     'identityClass' => 'wsl\rbac\models\DpAdminUser',
        //     'enableAutoLogin' => true,
        // ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ]
    ],
    'params' => $params,
    'language'=>'zh-CN',
    // 'modules' => [
    //     'admin' => '\wsl\rbac\modules\admin\Module'
    // ],
    // 'controllerMap' => [
    //     'site' => '\wsl\rbac\controllers\SiteController',
    //     'extJs' => [ // 按需配置,未配置的key会使用默认值
    //         'path' => '/dp/extjs', // ExtJs符号连接路径
    //         'extendPath' => '/dp/extjs-extend', // ExtJs扩展符号连接路径
    //         'appJsPath' => '/app.js', // app.js路径
    //         'bootstrapJsPath' => '/dp/extjs-extend/bootstrap.js', // bootstrap.js路径
    //         'bootstrapJsonPath' => '/dp/extjs-extend/bootstrap.json', // bootstrap.json路径
    //         'bootstrapCssPath' => '/dp/extjs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css', // bootstrap.css路径
    //     ],
    // ],
];
